package com.ruoyi.project.his.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.his.domain.HisDept;
import com.ruoyi.project.his.service.IHisDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/his/dept")
public class HisDeptController extends BaseController {
    @Autowired
    private IHisDeptService iHisDeptService;


    @GetMapping("/list")
    @PreAuthorize("@ss.hasAnyPermi('his:dept:list')")
    public TableDataInfo list(HisDept hisDept){
        startPage();
        List<HisDept> list=iHisDeptService.selectDeptLidt(hisDept);
        return getDataTable(list);
    }
}
